package com.shine.icis.hbean;

import java.io.Serializable;
import java.text.DecimalFormat;

import com.shine.icis.util.Tools;

public class R13ChkFactAmt implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3662405149335236166L;
	
	private DecimalFormat doubleFormat = new DecimalFormat("##,##0.00");
	private int busiDate;//报送日期
	private double shFactAmt;//上海划转金额
	private double szFactAmt;//深圳划转金额
	private int operDate;//操作日期
	private int operTime;//操作时间
	private String note;//备注
	
	public int getBusiDate() {
		return busiDate;
	}
	public void setBusiDate(int busiDate) {
		this.busiDate = busiDate;
	}
	public double getShFactAmt() {
		return shFactAmt;
	}
	public String getShFactAmtText() {
		return doubleFormat.format(shFactAmt);
	}
	public void setShFactAmt(double shFactAmt) {
		this.shFactAmt = shFactAmt;
	}
	public double getSzFactAmt() {
		return szFactAmt;
	}
	public String getSzFactAmtText() {
		return doubleFormat.format(szFactAmt);
	}
	public void setSzFactAmt(double szFactAmt) {
		this.szFactAmt = szFactAmt;
	}
	public String getFactAmtText(){
		return doubleFormat.format(shFactAmt + szFactAmt);
	}
	public int getOperDate() {
		return operDate;
	}
	public void setOperDate(int operDate) {
		this.operDate = operDate;
	}
	public int getOperTime() {
		return operTime;
	}
	public void setOperTime(int operTime) {
		this.operTime = operTime;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	public String getFormatOperTime() {
		StringBuffer sb = new StringBuffer();
		sb.append(operDate);
		if (sb.length() != 8) {
			return "";
		}
		sb.insert(6, "-").insert(4, "-");
		//121200 -> 12:12:00
		StringBuffer sbt = new StringBuffer();
		sbt.append(Tools.getFixedNum(operTime, 6));
		sbt.insert(4, ":").insert(2, ":").toString();
		
		return sb.append(" ").append(sbt).toString();
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + busiDate;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final R13ChkFactAmt other = (R13ChkFactAmt) obj;
		if (busiDate != other.busiDate)
			return false;
		return true;
	}
	
	
}
